package com.ruoyi.wbgame.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wbgame.mapper.WbGameQuestionMapper;
import com.ruoyi.wbgame.domain.WbGameQuestion;
import com.ruoyi.wbgame.service.IWbGameQuestionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 游戏问题Service业务层处理
 * 
 * @author guguofu
 * @date 2021-04-16
 */
@Service
public class WbGameQuestionServiceImpl implements IWbGameQuestionService 
{
    @Autowired
    private WbGameQuestionMapper wbGameQuestionMapper;

    /**
     * 查询游戏问题
     * 
     * @param gameId 游戏问题ID
     * @return 游戏问题
     */
    @Override
    public WbGameQuestion selectWbGameQuestionById(Long gameId)
    {
        return wbGameQuestionMapper.selectWbGameQuestionById(gameId);
    }

    /**
     * 查询游戏问题列表
     * 
     * @param wbGameQuestion 游戏问题
     * @return 游戏问题
     */
    @Override
    public List<WbGameQuestion> selectWbGameQuestionList(WbGameQuestion wbGameQuestion)
    {
        return wbGameQuestionMapper.selectWbGameQuestionList(wbGameQuestion);
    }

    /**
     * 新增游戏问题
     * 
     * @param wbGameQuestion 游戏问题
     * @return 结果
     */
    @Override
    public int insertWbGameQuestion(WbGameQuestion wbGameQuestion)
    {
        return wbGameQuestionMapper.insertWbGameQuestion(wbGameQuestion);
    }

    /**
     * 修改游戏问题
     * 
     * @param wbGameQuestion 游戏问题
     * @return 结果
     */
    @Override
    public int updateWbGameQuestion(WbGameQuestion wbGameQuestion)
    {
        return wbGameQuestionMapper.updateWbGameQuestion(wbGameQuestion);
    }

    /**
     * 删除游戏问题对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWbGameQuestionByIds(String ids)
    {
        return wbGameQuestionMapper.deleteWbGameQuestionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除游戏问题信息
     * 
     * @param gameId 游戏问题ID
     * @return 结果
     */
    @Override
    public int deleteWbGameQuestionById(Long gameId)
    {
        return wbGameQuestionMapper.deleteWbGameQuestionById(gameId);
    }
}
